package exteditapp.command;

/**
 * Tries to start external editor behavior. Create controller for main module. 
 * Register default view as listener of main module. Create empty working file.
 * @author Arturas Smorgun, artuas@smorgun.lt
 */
public class CommandClose extends ICommand {

	/**
	 * Default constructor
	 */
	public CommandClose(){
		super();
	}

	/**
	 * Execution of file close
	 * @return true on success and false otherwise
	 */
	public Boolean execute() {
		execution = true;
		//TODO implement file close procedure
		execution = false;
		file.getModule().getInvoker().setExecution(execution);
		return false;
	}

	/**
	 * Method for command execution invocation in separated thread
	 */
	public void run() {
		execute();
	}

}
